﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//1-1中，使两个平台停止移动
public class Trigger_E : TriggerArea
{
    [SerializeField]
    private List<Platform_Movable> platforms_start;

    protected override void OnEnter(Collider2D collider)
    {
        StartCoroutine(OnTouchPlayer());
    }

    private IEnumerator OnTouchPlayer()
    {
        yield return null;
        foreach (Platform_Movable obj in platforms_start)
        {
            if(obj.b_started)
                obj.DelayStop();
        }
    }
}
